home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / source / zendisk1 / lst10-7.asm < prev    next >
Assembly Source File  |  1990-02-15  |  465b  |  24 lines

  1. ;
  2. ; *** Listing 10-7 ***
  3. ;
  4. ; Initializes a 1000-word array using a loop and
  5. ; non-string instructions.
  6. ;
  7.     jmp    Skip
  8. ;
  9. ARRAY_LENGTH    equ    1000
  10. WordArray    dw    ARRAY_LENGTH dup (?)
  11. ;
  12. Skip:
  13.     call    ZTimerOn
  14.     mov    di,offset WordArray
  15.             ;point to array to fill
  16.     sub    ax,ax    ;we'll fill with the value zero
  17.     mov    cx,ARRAY_LENGTH ;# of words to fill
  18. ZeroLoop:
  19.     mov    [di],ax    ;zero one word
  20.     inc    di    ;point to the next word
  21.     inc    di
  22.     loop    ZeroLoop
  23.     call    ZTimerOff
  24.